1 <?php
2 include(
"header.php");
3 include(
"sidebar.php");
4 include(
"dbconnection.php");
5 if
(isset($_GET['sparepartid']))
6 {
7 $results = mysql_query(
"DELETE from spareparts where spid ='$_GET[sparepartid]'");
8 }
9 $result= mysql_query(
"select * from spareparts");
10 ?>
11         
12                             
13         <div id=
"main">
14             
15             <a name=
"TemplateInfo"></a>
16             <h1>View Spareparts</h1>
17             <h3><center>
18               <a href=
"spareparts.php">Add spareparts</a>
19             </center></h3>
20             <?php

21 if
($ctins == 1)
22 {
23     echo
"<center><b>Employees account created successfully...</b></center><br>";
24     echo
"<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
25 }

26 else

27 {
28     ?>
29         <form id=
"form1" name="form1" method="post" action="">
30           <table width=
"686" border="1">
31             <tr>
32               <th scope=
"col">Image</th>
33               <th scope=
"col">Spareparts name</th>
34               <th scope=
"col">Spareparts type</th>
35               <th scope=
"col">Spareparts no</th>
36               <th scope=
"col">Description</th>
37               <th width=
"63" scope="col" colspan="3">Actions</th>
38             </tr>
39           <?php
40           
while($arrrec= mysql_fetch_array($result))
41           {
42            echo
" <tr>
43                <td>&nbsp; <img src='upload/$arrrec[image]' height='
75' width='100'></img></td>
44               <td>&nbsp; $arrrec[name]</td>
45               <td>&nbsp; $arrrec[type]</td>
46               <td>&nbsp; $arrrec[sparepartno]</td>
47               <td>&nbsp; $arrrec[description]</td>
48               <td><a href='viewsparepartsstoremore.php?sparepartid=$arrrec[spid]'>More</a></td><td><a href='spareparts.php?sparepartid=$arrrec[spid]'>Edit</a></td><td><a href='viewspareparts.php?sparepartid=$arrrec[spid]'>Delete</a></td>
49             </tr>"
;
50           }
51           ?>
52           </table>
53         </form>
54     <?php
55     }
56     ?>
57             <p>&nbsp;</p>
58 <br />
59                                             
60         </div>
61         
62 <!-- wrap ends here -->
63 </div>
64         
65 <?php
66 include(
"footer.php");
67 ?>


Gõ tìm kiếm nhanh...